﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class StaticData:Singleton<StaticData>
{

    public Dictionary<int, MonsterIfo> MonstersInfo = new Dictionary<int, MonsterIfo>();
    public Dictionary<int, TowerInfo> TowerInfos = new Dictionary<int, TowerInfo>();
    private void Start()
    {
        InitMonstersInfo();
        InitTowerInfos();
    }

    void InitMonstersInfo()
    {
        MonstersInfo.Add(0, new MonsterIfo() { id = 0,speed=1,hp=10,});
        MonstersInfo.Add(1, new MonsterIfo() { id = 1, speed = 3, hp = 5 });
        MonstersInfo.Add(2, new MonsterIfo() { id = 1, speed = 0.5f, hp = 30 });
    }


    void InitTowerInfos()
    {
        TowerInfos.Add(0, new TowerInfo() { id = 0, overLap=2, bulletType = "bullet", bulletSpeed = 30});
        TowerInfos.Add(1, new TowerInfo() { id = 1, overLap = 3, bulletType = "bullet", bulletSpeed = 5});
        TowerInfos.Add(2, new TowerInfo() { id = 1, overLap = 3, bulletType = "bullet", bulletSpeed = 10});
    }














    public static int numMonster;
    public static int[][] arry;

    public static void CurrntSpaner(int currentProgress)
    {
        switch (currentProgress)
        {
            case 1:
                arry = new int[2][];
                arry[0] = new int[] { 0, 0, 0, 0 };
                arry[1] = new int[] { 2 };
                break;
            case 2:
                arry = new int[3][];
                arry[0] = new int[] { 0, 0, 0, 0 };
                arry[1] = new int[] { 1};
                arry[2] = new int[] { 2 };
                break;
            case 3:
                arry = new int[3][];
                arry[0] = new int[] { 0, 0, 0, 0 };
                arry[1] = new int[] { 1, 1 };
                arry[2] = new int[] { 2 };
                break;
            case 4:
                arry = new int[3][];
                arry[0] = new int[] { 0, 0, 0, 0 ,0};
                arry[1] = new int[] { 1, 1 ,1};
                arry[2] = new int[] { 2 };
                break;
            case 5:
                arry = new int[3][];
                arry[0] = new int[] { 0, 0, 0, 0,0,0 };
                arry[1] = new int[] { 1, 1,1,0 };
                arry[2] = new int[] { 2 };
                break;
            case 6:
                arry = new int[3][];
                arry[0] = new int[] { 0, 0, 0, 0 };
                arry[1] = new int[] { 1, 1 ,0,1};
                arry[2] = new int[] { 2 };
                break;
            case 7:
                arry = new int[3][];
                arry[0] = new int[] { 0, 0, 0, 0 };
                arry[1] = new int[] { 1, 1 ,1,0,2};
                arry[2] = new int[] { 2 };
                break;
            case 8:
                arry = new int[3][];
                arry[0] = new int[] { 0, 0, 0, 0 };
                arry[1] = new int[] { 1, 1,1,1,1,1 };
                arry[2] = new int[] { 2 ,1,1};
                break;
            case 9:
                arry = new int[3][];
                arry[0] = new int[] { 0, 0, 0, 0 };
                arry[1] = new int[] { 1, 1 ,2,1,1,2,1,2};
                arry[2] = new int[] { 2,3 };
                break;
            default:
                break;
        }
    }
}
